<?php

namespace App\Http\Middleware;

use Closure;

class WZdownMiddleware
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        
        //检测管理员是否需要开启网站
        if(empty(session('status'))){
           return $next($request); 
        }else{
            abort(503);
        }
    }

}
